function getxhr() {
	var a=false;
	try{
		a=new ActiveXObject('Msxml2.XMLHTTP');
	}catch (e){
		try{
			a=new ActiveXObject('Microsoft.XMLHTTP');
		}catch (e2){
			a = false;
		}
	}
	if (!a && typeof XMLHttpRequest != 'undefined'){
		a = new XMLHttpRequest();
	}
	return a;
}

var xhr = getxhr();

function _ajaxGet(url,cont,cb) {
	xhr.open('POST',url,true);
	xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	xhr.setRequestHeader('If-Modified-Since', '0');
	xhr.onreadystatechange=()=>{
		if(xhr.readyState==4){
			if(xhr.status==200){
				var res = xhr.responseText;
				cb(res);
			}
		}
	};
	xhr.send(cont);
}

function ajaxGet(url,cont){
 return new Promise((resolve, reject)=>{
  _ajaxGet(url,cont,(data)=>{resolve(data);});
 });
};

var JQ = function(id){
	return document.getElementById(id);
};
